<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
	<!-- Our custom layer class extends the default Magento layer class.
		 That class instantiates a bunch of interfaces, and for some reason,
		 Magento forgets the preferences for what to create those interfaces
		 as. Hence the following preferences. Do not remove these, or the
		 custom layer class will break. -->
	<preference for="Magento\Catalog\Model\Layer\ContextInterface" type="Magento\Catalog\Model\Layer\Context" />
	<preference for="Magento\Catalog\Model\Layer\ItemCollectionProviderInterface" type="Magento\Catalog\Model\Layer\Category\ItemCollectionProvider" />
	<preference for="Magento\Catalog\Model\Layer\StateKeyInterface" type="Magento\Catalog\Model\Layer\Category\StateKey" />
	<preference for="Magento\Catalog\Model\Layer\CollectionFilterInterface" type="Magento\Catalog\Model\Layer\Category\CollectionFilter" />
	<preference for="Magento\Catalog\Model\Layer\FilterableAttributeListInterface" type="Magento\Catalog\Model\Layer\Category\FilterableAttributeList" />
	<preference for="Magento\Catalog\Model\Layer\AvailabilityFlagInterface" type="Magento\Catalog\Model\Layer\Category\AvailabilityFlag" />
    
    <preference for="Magento\Catalog\Model\ResourceModel\Category" type="RTownley\CustomCollection\Model\ResourceModel\Category" />
    <preference for="Magento\Catalog\Model\ResourceModel\Layer\Filter\Price" type="RTownley\CustomCollection\Model\ResourceModel\Layer\Filter\Price" />
</config>
